#ifndef __LISTENSOCKET_HPP__
#define __LISTENSOCKET_HPP__

#include "IP.hpp"
#include "ConnectionHandler.hpp"

/**
 * Opens a socket, uses ConnectionHandler to process each incoming connection
 */
class ListenSocket {

	private:
		int fd;

	public:
		ListenSocket(const IP& interfaces, unsigned int port);

		int getConnection(IP* remoteIP);

		void handleConnection(ConnectionHandler* handler);

		~ListenSocket();

};
#endif

